home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HamCall (October 1991)
/
HamCall (Whitehall Publishing)(1991).bin
/
prgming
/
advbas
/
advbas.qrf
< prev
next >
Wrap
Text File
|
1990-10-14
|
19KB
|
472 lines
ADVBAS v4.0 Quick Reference
Note: variable names here are chosen for special clarity and may not
match those found in the ADVBAS.DOC file. The names of the variables used
are not important per se and may be changed readily. This is a quick
reference for your convenience, and is not intended to be used without the
ADVBAS.DOC manual.
Routines which use arrays or communications are marked as follows:
*not QB4* if they won't work with the QB environment of QuickBASIC 4.0
*not BC * if they won't work with the BC compiler of QuickBASIC 4.0
The array problem is due to bugs in QuickBASIC 4.0 which can be gotten
around, but which would require major revision of the affected ADVBAS
routines. Due to my contract with HCSI, I may not do this. However, the
array routines in ProBas are designed to work properly with QuickBASIC
4.0. The ADVBAS communications routines simply won't work any more, which
I'm still investigating-- Microsoft pulled a weird one here.
ADDMATI Add a scalar to an array.
*not QB4* CALL ADDMATI(VARPTR(ARRAY(1)), ARRAYSIZE, SCALAR, OVFLOWERR)
ANY2DEC Convert an integer in any base (2-35) to decimal (base 10).
CALL ANY2DEC(ANYNUM$, NUMBASE, DECNUM, ERRCODE)
BKSCROLL Scroll part of the screen backwards or clear it.
BKSCROLL(LEFTCOL, TOPROW, RTCOL, BOTROW, LINES)
BKSPACE Destructive backspace.
CALL BKSPACE(COL, ROW)
LOCATE ROW, COL
BLOCKMOVE Copy information from one area of memory to another.
Direction: 0 forward, nonzero backward
CALL BLOCKMOVE(FROMSEG, FROMOFS, TOSEG, TOOFS, BYTES, DIRECTION)
BSQ Squeeze the blanks out of a text string by encoding it.
CALL BSQ(ST$, SLEN)
ST$ = LEFT$(ST$, SLEN)
BUSQLEN Tell how long a BSQed string will be once unsqueezed.
CALL BUSQLEN(ST$, SLEN)
USQST$ = SPACE$(SLEN)
BUSQ Unsqueeze a BSQed string (use this -after- BUSQLEN).
CALL BUSQ(ST$, USQST$)
CALCATTR Calculate attribute (for Xqprint, etc) from colors.
CALL CALCATTR(FOREGROUND, BACKGROUND, ATTRIBUTE)
CARRIER Get modem Carrier Detect status.
*not QB4* Status: 0 off, nonzero on
*not BC * CALL CARRIER(COMMPORT, CDSTATUS)
CHECKSUM Calculate Xmodem-type checksum for a string.
CALL CHECKSUM(RECORD$, CHKSUM)
CLREOL Clear to the end of the current screen line.
CALL CLREOL
CLRKBD Clear the keyboard buffer of any pending keys.
CALL CLRKBD
COPYFILE Copies a file.
CALL COPYFILE(FROMFILE$+CHR$(0), TOFILE$+CHR$(0), ERRCODE)
CRC Calculate Xmodem-type Cyclical Redundancy Check for a string.
CALL CRC(RECORD$, HICRC, LOCRC)
DATASEG Return BASIC's Data Segment.
CALL DATASEG(DSEG)
DATE2INT Squeeze a date to a single integer.
CALL DATE2INT(MONTH, DAY, YEAR, SQZDATE)
DATEN2S Convert a date from numeric to string form.
CALL DATEN2S(MONTH, DAY, YEAR, DAT$)
DATES2N Convert a date from string to numeric form.
CALL DATES2N(MONTH, DAY, YEAR, DAT$)
DEC2ANY Converts a decimal (base 10) integer to any base (2-35).
CALL DEC2ANY(DECNUM, NUMBASE, ANYNUM$, ALEN)
ANYNUM$ = RIGHT$(ANYNUM$, ALEN)
DELAY Delays for a given number of seconds.
CALL DELAY(SECONDS)
DELAY18TH Delays for a given number of 18ths of seconds.
CALL DELAY18TH(FRACSECONDS)
DELCHR Delete a char from the specified screen location.
CALL DELCHR(ROW, COL)
DELSUB Delete a subdirectory.
CALL DELSUB(SUB$+CHR$(0), ERRCODE)
DISKSTAT Returns disk status information.
CALL DISKSTAT(DRIVE$, FREE.CLUSTERS, TOTAL.CLUSTERS,
BYTES.PER.SECTOR, SECTORS.PER.CLUSTER)
DMPRINT Displays a string using only DOS functions.
CALL DMPRINT(ST$)
DOSINKEY Get a character from the DOS standard input device.
CALL DOSINKEY(CHRCODE, CHRTYPE)
DRVSPACE Return free space left on disk (error returns negative value).
CALL DRVSPACE(DRV$, A, B, C)
FREE# = CDBL(A) * CDBL(B) * CDBL(C)
DTR Set the comm signal DTR.
*not QB4* DTRSTAT: 0 off, nonzero on
*not BC * CALL DTR(COMMPORT, DTRSTAT)
EQUIPMENT Return hardware configuration: K of RAM and I/O ports.
CALL EQUIPMENT(MEMORY, PARALLEL, SERIAL, JOYSTICK)
EXIST See if a given file exists (no wildcards).
CALL EXIST(FIL$+CHR$(0), FILEXISTS)
IF FILEXISTS THEN PRINT "File exists"
EXTRACT Extract a substring from a string using a given delimiter.
CALL EXTRACT(ST$, DELIM$, INDEX, START, SLEN)
SUBSTR$ = MID$(ST$, START, SLEN)
FCLOSE Close a file opened by FOPEN or FCREATE.
CALL FCLOSE(HANDLE)
FCREATE Create a file or truncate an existing one.
Attribute: 0 normal, 2 hidden, 32 archive.
CALL FCREATE(FIL$+CHR$(0), ATTR, HANDLE, ERRCODE)
FINDFIRSTF Get a file using wildcards (used for first call). See also
FINDNEXTF, GETNAMEF, GETATTRF, GETDATEF, GETTIMEF, GETSIZEF.
CALL FINDFIRST(FIL$+CHR$(0), ATTR, ERRCODE)
FINDNEXTF Get the next file using wildcards (see FINDFIRSTF et al).
CALL FINDNEXTF(ERRCODE)
FOPEN Open an existing file.
Access: 0 read, 1 write, 2 read/write
Mode: 0 normal, 1 exclude, 2 deny wrt, 3 deny read, 4 deny none
CALL FOPEN(FIL$+CHR$(0), FACCESS, FMODE, HANDLE, ERRCODE)
FREAD Read from a file opened by FOPEN or FCREATE.
*not QB4* CALL FREAD(HANDLE, VARPTR(ARRAY(1)), BYTES, BYTESREAD, ERRCODE)
FSETEND Move to the end of an open file (for appending).
CALL FSETEND(HANDLE)
FSETREC Move to a given record of an open file.
CALL FSETREC(HANDLE, RECSIZE, RECNUMBER)
FWRITE Write to a file opened by FOPEN or FCREATE.
*not QB4* CALL FWRITE(HANDLE, VARPTR(ARRAY(1)), BYTES, BYTESWRIT, ERRCODE)
GETATTRF Get the attribute of a file found with FINDxxxF.
Attribute: 1 readonly, 2 hidden, 4 system, 8 volume label,
16 subdir, 32 archive. Attributes are additive.
CALL GETATTRF(ATTR)
GETCRT Get the display type (0: mono, -1: color).
CALL GETCRT(DISPLAYTYPE)
GETDATEF Get the date of a file found with FINDxxxF.
CALL GETDATEF(MONTH, DAY, YEAR)
GETDOSV Get the current DOS version.
CALL GETDOSV(MAJORV, MINORV)
GETDRV Get the current default disk drive.
DRV$ = " "
CALL GETDRV(DRV$)
GETEXTM Get amount of extended memory (AT systems only).
CALL GETEXTM(KILOBYTES)
GETFATTR Get the attribute of a file.
Attribute: 1 readonly, 2 hidden, 4 system, 8 volume label,
16 subdir, 32 archive. Attributes are additive.
CALL GETFATTR(FIL$+CHR$(0), ATTR)
GETFDATE Get the date of a file. If error, MONTH set to -1.
CALL GETFDATE(FIL$+CHR$(0), MONTH, DAY, YEAR)
GETFTIME Get the (24hr) time of a file. If error, HOUR set to -1.
CALL GETFTIME(FIL$+CHR$(0), HOUR, MINUTE, SECOND)
GETKBD Get the status of the keyboard toggles.
CALL GETKBD(INSERT, CAPSLOCK, NUMLOCK, SCROLLLOCK)
GETKEY Wait for and return one of a specified list of keys.
KY$=" "
CALL GETKEY(GOODKEY$, KY$)
GETLIMM Returns the status of expanded memory in the system.
CALL GETLIMM(TOTPAGES, FREEPAGES)
GETLINE Returns a selected line from a saved screen (see SCRSAVE).
*not QB4* LINE$ = SPACE$(80)
CALL GETLINE(VARPTR(SCRN(1)), LINENR, LINE$, LLEN)
LINE$ = LEFT$(LINE$, LLEN)
GETNAMEF Get the filename of a file found using FINDxxxF.
FIL$ = SPACE$(12)
CALL GETNAMEF(FIL$, FLEN)
FIL$ = LEFT$(FIL$, FLEN)
GETSCREEN Get and save any part of any screen page in an array.
*not BC * CALL GETSCREEN(SCRN(0), TOPROW, LFTCOL, BOTROW, RGTCOL,
*not QB4* PAGE, SCRMODE)
GETSIZEF Get the size of a file found using FINDxxxF.
CALL GETSIZEF(SIZELO, SIZEHI)
SIZELO# = CDBL(SIZELO)
IF SIZELO<0 THEN SIZELO# = SIZELO# + 65536#
FILESIZE# = SIZELO# + CDBL(SIZEHI) * 65536#
GETSUB Get the default subdirectory.
SUB$ = STRING$(64,0)
CALL GETSUB(SUB$, SLEN)
SUB$ = "\" + LEFT$(SUB$, SLEN)
GETTIMEF Return the (24hr) time of a file found using FINDxxxF.
CALL GETTIMEF(HOUR, MINUTE, SECOND)
INSCHR Insert a space at the specified screen location.
CALL INSCHR(ROW, COL)
INT2DATE Unsqueeze a date squeezed by DATE2INT.
CALL INT2DATE(MONTH, DAY, YEAR, SQZDATE)
INT2TIME Unsqueeze a time squeezed by TIME2INT.
CALL INT2TIME(HOUR, MIN, SEC, SQZTIME)
KEYPRESS Returns nonzero if a key is waiting in the keyboard buffer.
CALL KEYPRESS(KEYHIT)
LOCASE Convert uppercase characters to lowercase.
CALL LOCASE(ST$)
LROTATE Rotate the characters in a string left once.
CALL LROTATE(ST$)
MAKESUB Make a subdirectory.
CALL MAKESUB(SUB$+CHR$(0), ERRCODE)
MAKEWINDOW Makes a pop-up window appear on the display.
Frame: 0 none, 1 single lines, 2 double lines,
3 double v single h, 4 single v double h
Type: 0 normal, 1 growing, 2 shadowed, 3 growing shadowed
CALL MAKEWINDOW(LEFTCOL, TOPROW, RIGHTCOL, BOTTOMROW,
LABEL$, FRAME, TYPE, FORE, BACK, PAGE)
MDELCHR Delete char at current cursor position, obeying MWINDOW.
CALL MDELCHR
MINSCHR Insert space at current cursor position, obeying MWINDOW.
CALL MINSCHR
MLOAD Same as BASIC's BLOAD statement.
CALL MLOAD(FIL$+CHR$(0))
MMBUTTON Returns which mouse buttons are currently pressed.
CALL MMBUTTON(LEFTBUTTON, RIGHTBUTTON)
MMCHECK Returns status of mouse & number of buttons. Resets mouse.
CALL MMCHECK(BUTTONS)
IF BUTTONS=0 THEN PRINT "No Mouse!"
MMCLICK Returns which mouse buttons were clicked since last check.
CALL MMCLICK(LEFTBUTTON, RIGHTBUTTON)
MMCURSOROFF Makes the mouse cursor invisible.
CALL MMCURSOROFF
MMCURSORON Makes the mouse cursor visible.
CALL MMCURSORON
MMGETLOC Returns the position of the mouse cursor.
CALL MMGETLOC(COL, ROW)
MMSETLOC Sets the position of the mouse cursor.
CALL MMSETLOC(COL, ROW)
MMSETRANGE Sets the range of permissible values for the mouse cursor.
CALL MMSETRANGE(LEFTCOL, TOPROW, RIGHTCOL, BOTTOMROW)
MONTH Given the month number, return the month name.
MONTH$ = SPACE$(9)
CALL MONTH(MONTH$, MLEN, MONTHNR)
MONTH$ = LEFT$(MONTH$, MLEN)
MPRINTC Display a character using DOS calls, obeying MWINDOW (qv).
CALL MPRINTC(CH$, COL, ROW)
LOCATE ROW, COL
MPRINT Display a string using DOS calls, obeying MWINDOW (qv).
CALL MPRINT(ST$, COL, ROW)
LOCATE ROW, COL
MULTIAND Performs AND on each char of a string with a supplied value.
CALL MULTIAND(ST$, ANDVAL)
MULTIOR Performs OR on each char of a string.
CALL MULTIOR(ST$, ORVAL)
MULTIXOR Performs XOR on each char of a string.
CALL MULTIXOR(ST$, XORVAL)
MWINDOW Set up a screen window for MPRINT/MPRINTC/MINSCHR/MDELCHR.
CALL MWINDOW(LEFTCOL, TOPROW, RTCOL, BOTROW)
PRINTSCREEN Send the current screen display to the first printer device.
CALL PRINTSCREEN
PUTSCREEN Put a saved area of the screen back at a given location.
*not BC * CALL PUTSCREEN(SCRN(0), TOPROW, LFTCOL, BOTROW, RGTCOL,
*not QB4* PAGE, SCRMODE)
QPRINT Quick print to screen. Doesn't understand control codes.
CALL QPRINT(ST$, ROW, COL)
READBITF Returns a value from an array of arbitrary (1-8) bit length.
*not QB4* CALL READBITF(VARPTR(ARRAY(1)), INDEX, BITLEN, VALUE)
RECOLOR Switch everything on the screen of one color to another (text).
CALL CALCATTR(OLDFORE, OLDBACK, OLDATTR)
CALL CALCATTR(NEWFORE, NEWBACK, NEWATTR)
CALL RECOLOR(OLDATTR, NEWATTR)
RESETPOINT Resets a point on a text screen (0-79 col by 0-49 row).
CALL RESETPOINT(COLUMN, ROW)
REVERSE Reverse the chars in a string.
CALL REVERSE(ST$)
RROTATE Rotate the chars in a string right once.
CALL RROTATE(ST$)
SCROLL Scroll a section of the screen or clear it.
CALL SCROLL(LEFTCOL, TOPROW, RTCOL, BOTROW, LINES)
SCRREST Restore the screen display from an array (see SCRSAVE).
*not QB4* CALL SCRREST(VARPTR(SCRN(1)))
SCRRESTP Restore the screen display to a given page from an array.
*not QB4* CALL SCRREST(VARPTR(SCRN(1)), PAGE)
SCRRESTPD Restore the screen to a given page with direct screen writes.
*not QB4* CALL SCRREST(VARPTR(SCRN(1)), PAGE)
SCRSAVE Save the current screen display to an array.
*not QB4* CALL SCRSAVE(VARPTR(SCRN(1)))
SCRSAVEP Save the display on a given screen page to an array.
*not QB4* CALL SCRSAVEP(VARPTR(SCRN(1)), PAGE)
SCRSAVEPD Save a given screen page with direct screen reads to an array.
*not QB4* CALL SCRSAVEPD(VARPTR(SCRN(1)), PAGE)
SETCOMM Set a communications port to the given parameters. Use the
*not QB4* "/D" switch when compiling programs that use this routine.
*not BC * Bps ("baud"): 0=300, 1=600, 2=1200, 3=2400, 4=4800, 5=9600,
6=19200, 7=38400
Parity: 0 none, 1 odd, 2 even
CALL SETCOMM(COMMPORT, BPS, PARITY, WORDLENGTH, STOPBITS)
SETDRV Set the default drive.
CALL SETDRV(DRV$)
SETFATTR Set a file's attribute.
Attribute: 1 readonly, 2 hidden, 4 system, 32 archive.
Attributes are additive.
SETFATTR(FIL$+CHR$(0), ATTR)
SETFTD Set a file's time and date. If error, returns -1 in MONTH.
CALL SETFTD(FIL$+CHR$(0), MONTH, DAY, YEAR,
HOUR, MINUTE, SECOND)
SETMATI Set an array to a given scalar (integer) value.
*not QB4* CALL SETMATI(VARPTR(ARRAY(1)), ARRAYSIZE, VALUE)
SETKBD Set the status of the keyboard toggles.
CALL GETKBD(INSERT, CAPSLOCK, NUMLOCK, SCROLLLOCK)
SETPOINT Set a point on a text screen (0-79 col by 0-49 row).
CALL SETPOINT(COLUMN, ROW)
SETSUB Set the default subdirectory.
CALL SETSUB(SUB$+CHR$(0), ERRCODE)
SHIFTL Shift an integer left by COUNT bits.
CALL SHIFTL(VALUE, COUNT)
SHIFTR Shift an integer right by COUNT bits.
CALL SHIFTR(VALUE, COUNT)
SOUNDEX Returns the Soundex code for a string.
SCODE$ = ST$
CALL SOUNDEX(ST$, SCODE$, SLEN)
SCODE$ = LEFT$(SCODE$, SLEN)
SPEAKER Sets speaker status. Toggle: 0 disable, nonzero enable.
CALL SPEAKER(TOGGLE)
STRIP Strips occurrences of a target character from a string.
CALL STRIP(ST$, TARGETCH$, SLEN)
ST$ = LEFT$(ST$, SLEN)
STRIPBLANKS Strips blanks (and control chars) from left (1), right (2),
or both (3) sides of a string.
CALL STRIPBLANKS(ST$, STRIPWHICH, SLEN)
ST$ = LEFT$(ST$, SLEN)
STRIPRANGE Strips chars within a given (inclusive) range from a string.
CALL STRIPRANGE(ST$, LO, HI, SLEN)
ST$ = LEFT$(ST$, SLEN)
SUBEXIST See if a subdirectory exists (drive spec is acceptable).
CALL SUBEXIST(SUB$+CHR$(0), SUBEX)
IF SUBEX THEN PRINT "Subdirectory exists"
TESTPOINT Tests a point on a text screen (0-79 col by 0-49 row).
CALL TESTPOINT(COLUMN, ROW, RESULT)
TIME2INT Squeeze the time down to a single integer.
CALL TIME2INT(HOUR, MIN, SEC, SQZTIME)
TIMEN2S Convert a time from numeric to string form.
CALL TIMEN2S(HOUR, MIN, SEC, TIM$)
TIMES2N Convert a time from string to numeric form.
CALL TIMES2N(HOUR, MIN, SEC, TIM$)
TINSTR Search for a given type of character in a string.
Alpha=1, Numeric=2, Symbol=4, Control=8, Graphics=16, Blank=32.
CALL TINSTR(ST$,CHRTYPE,PLACE)
UPCASE Convert a string to uppercase.
CALL UPCASE(ST$)
WEEKDAY Return the weekday (1 - 7, Sunday thru Saturday).
CALL WEEKDAY(DAY)
WRITEBITF Put a value in an array of arbitrary (1-8) bit length.
*not QB4* CALL WRITEBITF(VARPTR(ARRAY(1)), INDEX, BITLEN, VALUE)
XLATE Translate a string, char by char, using a translation table.
CALL XLATE(CH$, XLATETABLE$)
XMPRINT Translate a char, and if it's not NUL, display it via DOS.
CALL XMPRINT(CH$, XLATETABLE$, COL, ROW)
LOCATE ROW, COL
XQPRINT Extended quick print, with color and page selection.
CALL CALCATTR(FOREGROUND, BACKGROUND, ATTR)
CALL XQPRINT(ST$, ROW, COL, ATTR, PAGE)
XQPRINTD Extended direct quick print, with color and page selection.
CALL CALCATTR(FOREGROUND, BACKGROUND, ATTR)
CALL XQPRINTD(ST$, ROW, COL, ATTR, PAGE)